<?php

class Tool extends CI_Controller {
    public function __construct() {
        // 调用父类的构造方法
        parent::__construct();
        // 加载学生信息模型，并简写为task
        $this->load->model('Translate_model', 'trans');
    }

    public function index() {
        // echo '从零开始做作业';
        $this->load->view('dict.html');

    }

    public function getData($content = '') {
        $content = $this->input->post('content');
        $data    = $this->trans->translate($content);
        echo $data;
    }

}

?>
